package com.sun.dream.fish.controller;

import com.sun.dream.fish.service.TRoleMenuService;
import com.sun.dream.fish.vo.PageResultVO;
import com.sun.dream.fish.vo.ResultVO;
import com.sun.dream.fish.vo.back.RoleMenuVO;
import com.sun.dream.fish.vo.back.RoleVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ljl
 * @since 2023-12-18
 */
@RestController
@RequestMapping("/roleMenu")
public class TRoleMenuController {
    @Autowired
    TRoleMenuService roleMenuService;

    @PostMapping("/add")
    public ResultVO addRole(@RequestBody RoleMenuVO roleMenuVO) {
        return roleMenuService.saveRoleMenu(roleMenuVO);
    }

//    @GetMapping("/list")
//    public PageResultVO<RoleVO> getPage(@RequestParam(value = "name", required = false) String name,
//                                        @RequestParam(value = "status", required = false) String status,
//                                        @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
//                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
//        return roleMenuService.(name, status, pageNum, pageSize);
//    }
//
//    @PutMapping("/updateById")
//    public ResultVO update(@RequestBody RoleVO roleVO) {
//        return roleMenuService.updateRole(roleVO);
//    }
//
//    @DeleteMapping("/deleteById")
//    public ResultVO delete(@RequestParam("id") Integer id) {
//        return roleMenuService.deleteRole(id);
//    }
}
